<!DOCTYPE html>
<html>
<head>	
	<title>{:C('SERVER_HOME_NAME')}</title>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" />
</head>
<body>
	<div class="box">
		<include file="Public/top" />

		<div class="content">
			<include file="leftNav" />
			<div class="main p30">
				<form id="myform" action="__URL__/submitExposure" method="post" enctype="multipart/form-data"> 
					<div class="form-group">曝光次数：</div>
					<div class="form-group">
						<select class="select-price"   name="package_id">
                                                    <option value="0">请选择</option>
                                                    <volist name="datalist" id="vo" key="i"> 
							<option  value="{$vo.id},{$vo.price}">{$vo.exposure_time}天{$vo.exposure_num}次</option>
                                                    </volist>
						</select>
						消耗<span id="price" class="text-red">0</span>元
					</div>
					<div class="form-group"><P>请上传适当图片：支持jpg、jpeg和png文件，最大300kb，图片尺寸应大于480*480</P><p>最多上传9张图片</p></div>

					<div class="form-group">
						<div class="photos-upLoad">
					        <div class="photoItem">
						        <div class="icon"></div>
						        <a href="javascript:void(0)" class="add">上传图片</a>
						        <input type="file" name="img_upload[]"/>
                                                        <input type="hidden" value="9" id="maxImgLen">

					        </div>
					        <div class="clear"></div>
					    </div>
					</div>
					<div class="form-group">填写推送文案</div>	
					<div><textarea class="push-content" value="" name="exposure_content"></textarea>
                                           
                                        </div>			 				              
                                        <div class="btn-form"><a href="javascript:void(0);" onclick="$('#myform').submit();" class="btn">保存</a></div>
				</form>	
		</div>
	</div>
	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.min.js"></script>
	<script src="__PUBLIC__/js/page.js"></script>
	<script src="__PUBLIC__/js/detailRoll.js"></script>	
 <script>
function uploadImage(image){
    var fd = new FormData();
        fd.append('file', image);
    var result=false;
    $.ajax({
        type:'POST',
        url: '/ExposureOrder/uploadimg', 
        data: fd,
        cache: false,
        contentType: false,    //不可缺
        processData: false,    //不可缺
        dataType: 'json',
        success: function(data){
 
            if(data.info){
                
                 result =  true;
            }else{
               
              result =  false;
            }
        },
        error: function(err){
           result =  false;
        }
    });
    return result;
}
$("select").change(function(){
    var id_price =  $(this).val();
        if(id_price !=0)
        {
             arr =  id_price.split(",");
             $("#price").text(arr[1]);
        }else{
            $("#price").text(0);
        }   
});
        </script>
</body>
</html>